<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// [ 应用入口文件 ]

//php跨域请求;
$http_origin = isset($_SERVER['HTTP_ORIGIN'])?$_SERVER['HTTP_ORIGIN']:'';
//echo "c";exit;
if ($http_origin == "https://www.chuanchuan.tv" || $http_origin == "http://www.chuanchuan.tv")
{
    header("Access-Control-Allow-Origin: $http_origin");
}
header("Access-Control-Allow-Origin: *");
// session共享
//ini_set('session.cookie_domain', 'ke.haibinjiaoyu.com');

header( 'Access-Control-Allow-Credentials:true');

// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');
// 定义配置文件目录和应用目录同级
define('CONF_PATH', __DIR__.'/../config/');
//根目录
define('UPLOAD_PATH', __DIR__.'/../public/');
// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';
